const app = getApp();

const util = require('./../../utils/util.js');
import { checkAuth} from '../check.js'
const toCouponDetail = (e) => {
    let coupon = e.currentTarget.dataset.coupon;
    let couponId = coupon.couponId,
        saleRuleId = coupon.exchangeId ? coupon.exchangeId : '';
    let isLineIssuedStamps = coupon.isLineIssuedStamps;

    if ('1' == isLineIssuedStamps) {
        //面对面发券专用
        return;
    }

    checkAuth().then((res) => {
      
        let memberInfo = app.globalData.memberInfo;
        let jumpLink = '/pages/coupon/couponDetail/couponDetail?couponId=' + couponId + '&saleRuleId=' + saleRuleId;
        console.log(jumpLink,'验证通过')
        uni.navigateTo({
          url:jumpLink
        })
    });
};

module.exports = {
    toCouponDetail
};
